/**
 * 创建人:  @author huangpeng    
 * 创建时间:  2023年08月18日 12:01
 * 项目名称:  lemon-blog-cloud
 * 文件名称:  BlBlogOptions
 * 文件描述:  @Description: 文章相关操作类
 * 公司名称:  柠檬
 *
 * All rights Reserved, Designed By 柠檬 
 * @Copyright: 2022-2023
 *
 */
package com.lemon.blog.web.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lemon.common.core.base.BaseEntity;
import com.lemon.common.core.serializer.JsonLongDeserializer;
import com.lemon.common.core.serializer.JsonLongSerializer;

import java.util.Objects;

/**
 * 包名称：com.lemon.blog.web.domain
 * 类名称：BlBlogOptions
 * 类描述：文章相关操作类
 * 创建人：@author huangpeng
 * 创建时间：2023年08月18日 12:01
 */
public class BlBlogOptions extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 主键id */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long id;

    /**
     * 用户id
     */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long userId;

    /**
     * 博客id
     */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long blogId;

    /**
     * 是否阅读，0否1是
     */
    private Integer dvRead;

    /**
     * 是否点赞，0否1是
     */
    private Integer dvLike;

    /**
     * 是否点踩，0否1是
     */
    private Integer dvDislike;

    /**
     * 是否收藏，0否1是
     */
    private Integer dvCollection;

    /**
     * 操作类型，LIKE: 点赞，COLLECTION: 收藏，DISLIKE: 点踩
     */
    private String businessType;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getBlogId() {
        return blogId;
    }

    public void setBlogId(Long blogId) {
        this.blogId = blogId;
    }

    public Integer getDvRead() {
        return dvRead;
    }

    public void setDvRead(Integer dvRead) {
        this.dvRead = dvRead;
    }

    public Integer getDvLike() {
        return dvLike;
    }

    public void setDvLike(Integer dvLike) {
        this.dvLike = dvLike;
    }

    public Integer getDvDislike() {
        return dvDislike;
    }

    public void setDvDislike(Integer dvDislike) {
        this.dvDislike = dvDislike;
    }

    public Integer getDvCollection() {
        return dvCollection;
    }

    public void setDvCollection(Integer dvCollection) {
        this.dvCollection = dvCollection;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    @Override
    public String toString() {
        return "BlBlogOptions{" +
                "id=" + id +
                ", userId=" + userId +
                ", blogId=" + blogId +
                ", dvRead=" + dvRead +
                ", dvLike=" + dvLike +
                ", dvDislike=" + dvDislike +
                ", dvCollection=" + dvCollection +
                ", businessType='" + businessType + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BlBlogOptions that = (BlBlogOptions) o;
        return Objects.equals(id, that.id) && Objects.equals(userId, that.userId) && Objects.equals(blogId, that.blogId) && Objects.equals(dvRead, that.dvRead) && Objects.equals(dvLike, that.dvLike) && Objects.equals(dvDislike, that.dvDislike) && Objects.equals(dvCollection, that.dvCollection) && Objects.equals(businessType, that.businessType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userId, blogId, dvRead, dvLike, dvDislike, dvCollection, businessType);
    }
}